home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_5.lha / 8_5 / FILE.c < prev    next >
Text File  |  1993-08-08  |  369b  |  18 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / create a FILE using the given buffer and mode
  6. ILE::FILE(streambuf *st, open_mode m)
  7.  
  8.    sb = st;
  9.    mode = m;
  10.  
  11.    // create the appropriate stream
  12.    if (mode == input)
  13. in = new istream(sb);
  14.  
  15.    else
  16. out = new ostream(sb);
  17.  
  18.